package muster;

import utils.Utils;

import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;

/**
 * @author:Administrator
 * @date:2022/1/20
 * @describe:
 */
public class ListIteratorDome {

    public static void main(String[] args) {

        List list = new ArrayList();
        list.add(new Fruit("香蕉", 13.56f));
        list.add(new Fruit("苹果", 10.85f));
        list.add(new Fruit("橘子", 19.95f));
        list.add(new Fruit("西瓜", 16.25f));

        ListIterator iterator = list.listIterator(list.size());

        while (iterator.hasPrevious()) {
            System.out.println(iterator.previous());
        }
    }
}
